package com.vegetable.modules.entity.stock.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vegetable.modules.entity.baseData.po.BaseQueryPO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * <p>
 * 库存查询参数对象
 * </p>
 *
 * @author wangruijie
 * @since 2024-03-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="Stock对象", description="库存表")
public class StockQueryPO extends BaseQueryPO {

    @ApiModelProperty("主键id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "商品ID")
    private Long commodityId;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "商品编码")
    private String commonCode;

    @ApiModelProperty(value = "代办名")
    private String agentName;

    @ApiModelProperty(value = "库存批次编码")
    private String stockBatchNo;

    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date endTime;

    @ApiModelProperty(value = "商品分类")
    private String category;

    @ApiModelProperty(value = "商品分类ID")
    private Long categoryId;

    @ApiModelProperty(value = "标签")
    private Integer tag;

    @ApiModelProperty(value = "规格ID")
    private Long specsId;
    
    @ApiModelProperty(value = "规格名称")
    private String specsName;

    @ApiModelProperty(value = "是否只显示有效库存")
    private Boolean validStock = Boolean.TRUE;
    
    @ApiModelProperty(value = "是否超期成品查询")
    private Boolean overdueFinishedProduct;
}